Image encoding method, image encoding apparatus, and image encoding program

ABSTRACT

An image encoding apparatus capable of reducing the computational complexity in intra-prediction of an encoding optimization process is provided. The image encoding apparatus includes a reference pixel generation unit that generates reference pixels from predicted pixels of neighboring pixels and pixels of an original image for intra-prediction directions, a pseudo intra-predicted pixel generation unit that generates pseudo intra-predicted pixels from the reference pixels and the intra-prediction directions, a coding cost calculation unit that calculates coding costs for the intra-prediction directions from errors between the pseudo intra-predicted pixels and the pixels of the original image and generated bit amounts when the pseudo intra-predicted pixels are generated, and an intra-prediction direction setting unit that sets an intra-prediction direction corresponding to the lowest coding cost among the coding costs as an optimal intra-prediction direction.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a 371 U.S. National Stage of InternationalApplication No. PCT/JP2014/069296, filed Jul. 22, 2014. This applicationclaims priority to Japanese Patent Application No. 2013-155034, filedJul. 25, 2013. The disclosures of the above applications areincorporated herein by reference.

TECHNICAL FIELD

The present invention relates to an image encoding method, an imageencoding apparatus, and an image encoding program.

BACKGROUND ART

High efficiency video coding (HEVC) developed as a next video codingstandard scheme of a standard H.264, which is a conventional art, is acoding scheme for realizing higher coding efficiency than the standardH.264. However, the HEVC involves complicated processes and largecomputational complexity, and thus the HEVC has a problem that acomputational cost of coding should be significantly reduced in order toemploy the HEVC in actual products. In particular, in the HEVC, sinceoptions for the size of a block, which is a unit of coding, increase,processes associated with optimization of coding in which an optimalblock size and an optimal mode are determined increase and thus it isnecessary to reduce the computational complexity thereof.

In video coding, pixels are generally coded in units of blocks. In theHEVC, concepts of a largest coding unit (LCU) and a coding unit (CU) areintroduced as blocks for which coding is performed, and a concept of aprediction unit (PU) is introduced as a unit of prediction. Hereinafter,the LCU, the CU, and the PU will be described. In the HEVC, one picture(image) is equally divided into squares having a given size, asillustrated in FIG. 11. FIG. 11 is a diagram illustrating an example ofdivision of a picture. The square blocks illustrated in FIG. 11 arereferred to as LCUs. The sizes of the LCUs can be selected from among16×16 pixels, 32×32 pixels, and 64×64 pixels, but are all the samewithin one picture.

A CU, which is a unit for performing actual coding, is a square blockthat exists in one LCU, and a prediction mode is determined using the CUas a unit. The CU is a block having the same size as the LCU, or, asillustrated in FIG. 11, the CU is a square block obtained by equallydividing the LCU in four or a square block obtained by repeatedlyapplying such a quadrisection process to the LCU. When the size of theLCU is (2^(N))×(2^(N)), the size of the CU can be selected from among(2^(M))×(2^(M)) (3≤M≤N, where N and M are integers).

Further, the PU is a unit for setting a prediction direction in the CU.FIGS. 12A and 12B are diagrams illustrating examples of options fordivision into PUs (PU division types). As illustrated in FIG. 12A, ininter-prediction, selection from eight division methods is possible.Further, as illustrated in FIG. 12B, in intra-prediction, selection fromtwo division methods is possible only when a CU size is 8×8. In othercases, the PU is the same as the CU. For improvement of codingefficiency, it is necessary to perform division into CUs and setting ofa prediction mode of each CU suitable for each LCU. In particular, whilea degree of freedom of selection of the division method of the CU andthe prediction mode increases as the size of the LCU increases, andimprovement of coding efficiency is expected by performing appropriatedivision into CUs and appropriate setting of a prediction mode, there isa problem in that it is necessary to perform a computation on all CUsthat can be options and thus the computational complexity increasesaccordingly.

An actual process regarding selection of the CU size in one LCU will bedescribed using an example of an HEVC test model (HM). An operation of acoding cost calculation process for a determination of shapes of dividedPUs in one CU will first be described with reference to FIG. 13. FIG. 13is a flowchart illustrating an operation of a coding cost calculationprocess for a determination of shapes of divided PUs in one CU. First,inter-prediction is performed for each PU division type (step S71).Then, if a coding cost is the lowest, the lowest coding cost, and shapesof the divided PUs and an inter-prediction direction that realize thelowest coding cost are stored (step S72).

Then, intra-prediction is performed for each PU division type (stepS73). Then, if a coding cost is the lowest, the lowest coding cost, andshapes of divided PUs and an intra-prediction direction that realize thelowest coding cost are stored (step S74).

Next, an operation of a coding cost calculation process for adetermination of the CU division size in one LCU will be described withreference to FIG. 14. FIG. 14 is a flowchart illustrating the operationof the coding cost calculation process for a selection of the CUdivision size in one LCU. First, steps S71 to S74 illustrated in FIG. 13are repeated in one CU to calculate coding costs for CUs of all sizesand determine CU sizes (step S75). For an LCU, the coding cost when a CUis divided into four is compared with the coding cost when the CU is notdivided into four, the division size of the CU in which the coding costis the lowest is selected, and the selected division size is stored(step S76).

It is to be noted that a QP loop, which is not described above, isillustrated in FIG. 14. In the HEVC, a quantization parameter QP thatdetermines a quantization step size can be set for each CU if encodingis not performed using a fixed quantization parameter QP. In order torealize this, a structure of calculating an optimal coding cost whilechanging the value of the quantization parameter QP is included inreference software. Therefore, the QP loop is illustrated in FIG. 14.

A process of selecting an optimal mode, division shape, and divisionsize to obtain the lowest coding cost is referred to as a codingoptimization process. It is to be noted that while representations “LCU”and “CU” are used hereinafter as concepts of units of processing in theHEVC, units corresponding to the LCU and the CU are more generallyrepresented as a block and a sub-block, respectively, taking othercoding technologies into consideration.

Next, an operation of the coding optimization process will be described.FIG. 15 is a flowchart illustrating the operation of the codingoptimization process. First, coding costs of an inter-prediction mode, askip mode, and an intra-prediction mode are calculated (step S77).Subsequently, a mode in which the coding cost is the lowest is used as aprediction mode for each CU size, and an optimal mode is set and stored(step S78). This process is repeated for all the CU sizes. Then, acombination of divided CUs in which the coding cost is the lowest isdetermined (step S79).

Here, the coding cost means an RD cost as represented by Equation (1),and the optimization means a determination of coding by which the codingcost is the lowest.RD cost=D+λR  (1)

In Equation (1), D indicates a sum of squared errors between decodedpixels and pixels of an original image, R is a generated bit amount, andλ is a Lagrangian parameter. Further, in order to speed up the codingoptimization process, there is also a technique in which a pseudo RDcost in which D is replaced with a sum D′ of absolute differencesbetween predicted pixels and the pixels of the original image and R isreplaced with a generated bit amount R′ other than a bit amount ofcoefficients is used as the coding cost. Hereinafter, the coding cost isassumed to mean a cost as represented by the RD cost or the pseudo RDcost.

Next, an operation of a process for determining an optimal predictiondirection of intra-prediction will be described with reference to FIG.16. FIG. 16 is a flowchart illustrating the operation of the process fordetermining the optimal prediction direction of the intra-prediction. Aprocess of steps S82 to S85 to be described below is repeatedlyperformed while a certain prediction direction is selected (step S81).First, an intra-predicted image in the prediction direction is generatedusing neighboring encoded pixels (step S82). Subsequently, an errorbetween pixels of the intra-predicted image and pixels of the originalimage is calculated (step S83).

Then, a generated bit amount is calculated (step S84), and a coding costis calculated from the error and the generated bit amount (step S85).Then, steps S82 to S85 are repeated for each prediction direction.Finally, a direction in which the calculated coding cost is the lowestis set as an intra-prediction direction to thereby set an optimalintra-prediction direction (step S86).

In the coding optimization process, a block having a certain fixed sizeis divided into sub-blocks having an optimal sub-block size, and anoptimal prediction mode is determined for each sub-block. In order todetermine the optimal sub-block size and the optimal prediction mode inunits of blocks, it is necessary to obtain a coding cost in eachprediction mode for each sub-block size, as described above.Particularly, for a determination of the optimal intra-predictiondirection, it is necessary to perform decoding on neighboring encodedpixels necessary for generation of a predicted image for eachintra-prediction direction. These processes are also performed on asub-block that does not have an optimal size. However, in this case, aresult of decoding the neighboring pixels is used only for comparison ofthe coding costs.

Particularly, in the case of a determination using a pseudo RD cost,which is one of techniques aiming at speeding up the coding optimizationprocess, it is not necessary to encode a prediction error whencalculating R′; however, because a predicted image is used to calculateD′, it is necessary to encode and decode neighboring pixels used for thecalculation. Therefore, when an optimal coding cost of each sub-blocksize is determined through only speeding-up using a pseudo RD cost, anactual reduction of the computation process is achieved in only anarithmetic coding process of a prediction error coefficient, and it isnecessary to perform a decoding process in which the computationalcomplexity is large for each sub-block size.

It is to be noted that it is assumed that a case in which the generatedbit amount is described hereinbelow includes a case in which a generatedbit amount of coefficients is included and a case in which the generatedbit amount of the coefficients is not included.

Non-Patent Document 1 is an example in which speeding-up using theconventional art is performed. Non-Patent Document 1 introduces atechnique in which pixels of an original image or pixels obtained byapplying a filter to the pixels of the original image are used as pixelsof a pseudo intra-predicted image. With this technique, reference pixelsused for calculation of an optimal intra-prediction mode of each size ofa sub-block are only the pixels of the original image or the pixelsobtained by applying the filter to the pixels of the original image, andthus decoding of neighboring pixels is not necessary and thecomputational complexity can be reduced.

PRIOR ART DOCUMENTS Non-Patent Documents

-   Non-Patent Document 1: Takafumi Bando, Naoyuki Hirai, Tian Song, and    Takashi Shimamoto, “New Prediction Modes for Parallel Processing of    H.264/AVC”, Proceedings of International Conference on Multimedia    and Signal Processing (CMSP'11), pp. 344-347, Guilin, China, May    2011.-   Non-Patent Document 2: Sakae Okubo, Teruhiko Suzuki, Seishi    Takamura, and Takeshi Chujo, “Impress standard textbook series    H.265/HEVC textbook”, Impress Japan, Oct. 18, 2013.-   Non-Patent Document 3: K. McCann, B. Bross, W.-J. Han, I. K. Kim, K.    Sugimoto, and G J. Sullivan, “High Efficiency Video Coding (HEVC)    Test Model 15 (HM 15) Encoder Description”, Joint Collaborative Team    on Video Coding (JCT-VC) document JCTVC-Q 1002, March 2014.

SUMMARY OF INVENTION Problems to be Solved by the Invention

In the technique disclosed in Non-Patent Document 1, pixels of thepseudo intra-predicted image are generated using the pixels of theoriginal image or the pixels obtained by applying a fixed filter to thepixels of the original image as pixels of a reference image of theintra-prediction.

However, when only the pixels of the original image or only the pixelsobtained by applying the fixed filter to the pixels of the originalimage are used, there is a problem in that a quantization step size, aselected prediction mode, and the like, which are considered to have aninfluence on an original decoded image are not used, and thus correctprediction and correct cost calculation cannot be performed.

The present invention has been made in view of such circumstances, andan object thereof is to provide an image encoding method, an imageencoding apparatus, and an image encoding program capable of reducingthe computational complexity in intra-prediction of a codingoptimization process.

Means for Solving the Problems

An aspect of the present invention is an image encoding apparatusincluding: a reference pixel generation unit that generates referencepixels from predicted pixels of neighboring pixels and pixels of anoriginal image for intra-prediction directions; a pseudo intra-predictedpixel generation unit that generates pseudo intra-predicted pixels fromthe reference pixels and the intra-prediction directions; a coding costcalculation unit that calculates coding costs for the intra-predictiondirections from errors between the pseudo intra-predicted pixels and thepixels of the original image and generated bit amounts when the pseudointra-predicted pixels are generated; and an intra-prediction directionsetting unit that sets an intra-prediction direction corresponding tothe lowest coding cost among the coding costs as an optimalintra-prediction direction.

An aspect of the present invention is an image encoding apparatusincluding: a skip mode determination unit that determines whether aprediction mode of predicted pixels of neighboring pixels for anintra-prediction direction is a skip mode; an intra-predictedpixel/pseudo intra-predicted pixel generation unit that sets thepredicted pixels of the neighboring pixels as reference pixels andgenerates intra-predicted pixels from the reference pixels if adetermination result of the skip mode determination unit is the skipmode, and generates the reference pixels from the predicted pixels ofthe neighboring pixels and pixels of an original image and generatespseudo intra-predicted pixels from the generated reference pixels andintra-prediction directions if the determination result is a mode otherthan the skip mode; a coding cost calculation unit that calculatescoding costs for intra-prediction directions from errors between theintra-predicted pixels or the pseudo intra-predicted pixels and thepixels of the original image and generated bit amounts when theintra-predicted pixels or the pseudo intra-predicted pixels aregenerated; and an intra-prediction direction setting unit that sets anintra-prediction direction corresponding to the lowest coding cost amongthe coding costs as an optimal intra-prediction direction.

An aspect of the present invention is an image encoding apparatusincluding: a weighting coefficient generation unit that generatesweighting coefficients that are used when a pseudo intra-predicted imageis generated from a quantization step size of predicted pixels ofneighboring pixels for an intra-prediction direction; a pseudointra-predicted pixel generation unit that generates reference pixelsusing the weighting coefficients from the predicted pixels of theneighboring pixels and pixels of an original image, and generates pseudointra-predicted pixels from the reference pixels and intra-predictiondirections; a coding cost calculation unit that calculates coding costsfor the intra-prediction directions from errors between the pseudointra-predicted pixels and the pixels of the original image andgenerated bit amounts when the pseudo intra-predicted pixels aregenerated; and an intra-prediction direction setting unit that sets anintra-prediction direction corresponding to the lowest coding cost amongthe coding costs as an optimal intra-prediction direction.

In the image coding apparatuses, a coding cost for an intra-predictiondirection set in units of blocks may be compared with a coding cost fora mode other than an intra-prediction mode, and intra-prediction may beperformed again using a neighboring decoded image on a block in whichthe coding cost for the optimal intra-prediction direction is smaller.

An aspect of the present invention is an image encoding methodincluding: a reference pixel generation step of generating referencepixels from predicted pixels of neighboring pixels and pixels of anoriginal image for intra-prediction directions; a pseudo intra-predictedpixel generation step of generating pseudo intra-predicted pixels fromthe reference pixels and the intra-prediction directions; a coding costcalculation step of calculating coding costs for the intra-predictiondirections from errors between the pseudo intra-predicted pixels and thepixels of the original image and generated bit amounts when the pseudointra-predicted pixels are generated; and an intra-prediction directionsetting step of setting an intra-prediction direction corresponding tothe lowest coding cost among the coding costs as an optimalintra-prediction direction.

An aspect of the present invention is an image encoding program forcausing a computer to execute the image encoding method.

Advantageous Effects of Invention

In accordance with the present invention, it is possible to reduce thecomputational complexity of encoding. In particular, in accordance withthe present invention, an advantageous effect that it is possible toreduce the computational complexity in the intra-prediction of theencoding optimization process can be obtained.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating a configuration of an imageencoding apparatus to which the present invention is applied.

FIG. 2 is a block diagram illustrating a detailed configuration of anintra-prediction processing unit 101 illustrated in FIG. 1.

FIG. 3 is a schematic diagram describing a pseudo intra-predicted imageand a pseudo decoded image.

FIG. 4 is a flowchart illustrating an operation of an intra-predictionprocess using a pseudo decoded image in the intra-prediction processingunit 101 illustrated in FIG. 2.

FIG. 5 is a flowchart illustrating an operation of a determinationprocess of CU division and a prediction mode in one LCU in accordancewith a conventional process.

FIG. 6 is a flowchart illustrating an operation of a determinationprocess of CU division and a prediction mode in one LCU in accordancewith a first embodiment.

FIG. 7 is a flowchart illustrating an operation of an intra-predictionprocess using a pseudo decoded image in the intra-prediction processingunit 101 illustrated in FIG. 2.

FIG. 8 is a flowchart illustrating an operation of an intra-predictionprocess using a pseudo decoded image in the intra-prediction processingunit 101 illustrated in FIG. 2.

FIG. 9 is a flowchart illustrating an operation of a process ofcalculating a correct direction of intra-prediction in anintra-prediction direction setting unit 1013 illustrated in FIG. 2

FIG. 10 is a flowchart illustrating an operation of a determinationprocess of CU division and a prediction mode in one LCU in accordancewith a fourth embodiment.

FIG. 11 is a diagram illustrating an example of division of a picture(image).

FIG. 12A is a diagram illustrating an example of options of divisioninto PUs.

FIG. 12B is a diagram illustrating an example of options of divisioninto PUs.

FIG. 13 is a flowchart illustrating an operation of a coding costcalculation process for a determination of shapes of divided PUs in oneCU.

FIG. 14 is a flowchart illustrating an operation of a coding costcalculation process for a determination of a CU division size in oneLCU.

FIG. 15 is a flowchart illustrating an operation of a codingoptimization process.

FIG. 16 is a flowchart illustrating an operation of a process fordetermining an optimal prediction direction of intra-prediction.

MODES FOR CARRYING OUT THE INVENTION

Hereinafter, an image encoding apparatus to which the present inventionis applied will be described with reference to the drawings. FIG. 1 is ablock diagram illustrating a configuration of the image encodingapparatus to which the present invention is applied. The image encodingapparatus 100 includes an intra-prediction processing unit 101, aninter-prediction processing unit 102, a prediction residual signalgeneration unit (adding unit) 103, a transform processing unit 104, aquantization processing unit 105, an inverse quantization processingunit 106, an inverse transform processing unit 107, a decoded signalgeneration unit (adding unit) 108, a frame memory 109, a deblockingfilter processing unit 110, an inter-prediction information storage unit111, an intra-prediction information storage unit 112, and an entropyencoding processing unit 113. Since the configuration of the imageencoding apparatus 100 illustrated in FIG. 1 is equivalent to a videoencoding process block of the HEVC and is a known configuration asdescribed in Non-Patent Documents 2 and 3, the contents of which areincorporated herein by reference, and a detailed description thereofwill be omitted.

Next, a detailed configuration of the intra-prediction processing unit101 illustrated in FIG. 1 will be described with reference to FIG. 2.FIG. 2 is a block diagram illustrating the detailed configuration of theintra-prediction processing unit 101 illustrated in FIG. 1. In FIG. 2,reference numeral 1011 indicates a pseudo intra-predicted imagegeneration unit that generates a pseudo intra-predicted image. Referencenumeral 1012 indicates a coding cost calculation unit that calculates acoding cost. Reference numeral 1013 indicates an intra-predictiondirection setting unit that sets an intra-prediction direction. Theintra-prediction processing unit 101 uses pixels obtained usingpredicted pixels of neighboring pixels and pixels of an original image,rather than decoded pixels, as reference pixels of intra-prediction.

Here, a pseudo intra-predicted image and a pseudo decoded image will bedescribed with reference to FIG. 3. FIG. 3 illustrates a case in which acoding cost of a sub-block at the upper left corner in an encodingtarget block has already been calculated, and a coding cost of asub-block on the right side thereof is a calculation target. The codingcost of the sub-block at the upper left corner has already beencalculated, but a block shape thereof has not been definitelydetermined, and thus a decoded image is not generated. Therefore, thereare no neighboring left decoded pixels used for the intra-prediction.Accordingly, a pseudo decoded image generated from a reference image(corresponding to the “predicted pixels of the neighboring pixels”described above) and the original image (corresponding to “referencepixels” in “reference pixels obtained using the predicted pixels of theneighboring pixels and the pixels of the original image” to be describedbelow) are used, instead of the neighboring left decoded pixels, togenerate a pseudo intra-predicted image from the pseudo decoded imageand the intra-prediction direction. It is to be noted that an actualdecoded image is generated at a timing after shapes of divided blocks ofthe entire decoding target block are determined (for example, see FIGS.6 and 10).

First Embodiment

Next, an operation of an intra-prediction process using a pseudo decodedimage in accordance with a first embodiment of the present inventionwill be described with reference to FIG. 4. FIG. 4 is a flowchartillustrating the operation of the intra-prediction process using thepseudo decoded image in the intra-prediction processing unit 101illustrated in FIG. 2. The pseudo intra-predicted image generation unit1011 repeats a process in steps S1 to S4 to be described below whileselecting one intra-prediction direction (step S0). First, the pseudointra-predicted image generation unit 1011 generates pseudointra-predicted pixels from reference pixels determined using predictedpixels of neighboring pixels and pixels of an original image, and theintra-prediction direction (step S1). For example, the pseudointra-predicted image generation unit 1011 generates average values ofpixel values of the predicted pixels of the neighboring pixels and pixelvalues of co-located pixels of the original image as pixel values of thereference pixels.

Then, the pseudo intra-predicted image generation unit 1011 calculatesan error between the generated pseudo intra-predicted pixels and thepixels of the original image (step S2). The pseudo intra-predicted imagegeneration unit 1011 calculates a generated bit amount resulting fromgeneration of the pseudo intra-predicted pixels (step S3).

Then, the coding cost calculation unit 1012 calculates a coding cost foreach intra-prediction direction (step S4). After selecting all theintra-prediction directions, the intra-prediction direction setting unit1013 then sets the intra-prediction direction in which the coding costis the lowest as an optimal intra-prediction direction (step S5).

In intra-prediction when a coding optimization process is sped up,decoded pixels is used for calculation of the coding cost, and thus itis necessary to sequentially perform decoding of neighboring pixels indetermining an appropriate sub-block size and an appropriate predictionmode. In contrast, in the present embodiment, the pseudo intra-predictedpixels are generated from the reference pixels obtained using theneighboring predicted pixels and the pixels of the original image,rather than the neighboring decoded pixels, and the cost for eachprediction direction of intra-prediction is calculated. Accordingly,since an appropriate prediction cost is derived without performing thedecoding process, it is possible to realize reduction of thecomputational complexity while suppressing degradation of codingefficiency in the coding optimization process.

Next, a target for reduction in computation in accordance with the firstembodiment will be described with reference to FIGS. 5 and 6.

FIG. 5 is a flowchart illustrating an operation of a determinationprocess of CU division and a prediction mode in one LCU in theconventional process. First, an intra-predicted image in each predictionmode is generated using neighboring encoded pixels (step S11). Then, anerror between pixels of the intra-predicted image and the pixels of theoriginal image is calculated (step S12). Then, a generated bit amount iscalculated (step S13), and a coding cost is calculated from the errorand the generated bit amount (step S14). Steps S11 to S14 are repeatedfor all prediction modes. Then, the prediction mode in which the codingcost is the lowest is determined as a prediction mode of each CU size(step S15). Then, a decoded image is generated in accordance with thedetermined prediction mode (Step S16). Steps S11 to S16 are repeated forall the CU sizes. Finally, a combination of divided CUs in which thecoding cost is the lowest is obtained, and an LCU division shape isdetermined (step S17).

FIG. 6 is a flowchart illustrating an operation of a determinationprocess of CU division and a prediction mode in one LCU in accordancewith the present embodiment. First, pseudo intra-predicted pixels ineach prediction mode are generated from reference pixels that areobtained using predicted pixels of neighboring pixels and pixels of anoriginal image and a prediction mode (step S21). Then, an error betweenpixels of a generated pseudo intra-predicted image and the pixels of theoriginal image is calculated (step S22). Then, a generated bit amount iscalculated (step S23), and a coding cost is calculated from the errorand the generated bit amount (step S24). Steps S21 to S24 are repeatedfor all the prediction modes. Then, the prediction mode in which thecoding cost is the lowest is determined as a prediction mode of each CUsize (step S25). Steps S21 to S25 are repeated for all CU sizes. Then, acombination of divided CUs in which the coding cost is the lowest isobtained, and an LCU division shape is determined (step S26). Finally, adecoded image is generated in accordance with the determined LCUdivision shape (step S27).

In the conventional process, it is necessary to generate decoded pixelsfor each CU size, as shown in step S16 of FIG. 5. In contrast, in thepresent embodiment, it is not necessary to use neighboring decodedpixels in each intra-prediction, and thus it is sufficient thatgeneration of decoded pixels be performed only once for one LCU as shownin step S27 of FIG. 6. Accordingly, the computational complexity isreduced.

Second Embodiment

Next, an operation of an intra-prediction process using a pseudo decodedimage in accordance with a second embodiment of the present inventionwill be described with reference to FIG. 7. FIG. 7 is a flowchartillustrating an operation of the intra-prediction process using thepseudo decoded image in the intra-prediction processing unit 101illustrated in FIG. 2. In the process illustrated in FIG. 7, when thereference pixels are generated using the predicted pixels of theneighboring pixels and the pixels of the original image, pixels obtainedin consideration of a prediction mode of the predicted pixels of theneighboring pixels are used. The pseudo intra-predicted image generationunit 1011 repeats a process in steps S32 to S37 to be described belowwhile selecting one intra-prediction direction (step S31). First, thepseudo intra-predicted image generation unit 1011 determines whether theprediction mode of the predicted pixels of the neighboring pixels is askip mode (step S32). As a result of this determination, “if theprediction mode of the predicted pixels of the neighboring pixels is askip mode”, the pseudo intra-predicted image generation unit 1011generates intra-predicted pixels using predicted pixels of the skip mode(step S33).

In contrast, “if the prediction mode of the predicted pixels of theneighboring pixels is a mode other than the skip mode (anintra-prediction mode or an inter-prediction mode)”, the pseudointra-predicted image generation unit 1011 generates pseudointra-predicted pixels from reference pixels obtained using thepredicted pixels of the skip mode and the pixels of the original image,and the intra-prediction direction (step S34). For example, the pseudointra-predicted image generation unit 1011 generates average values ofpixel values of the predicted pixels of the neighboring pixels and pixelvalues of co-located pixels of the original image as pixel values of thereference pixels.

Then, the pseudo intra-predicted image generation unit 1011 calculatesan error between the generated intra-predicted pixels or pseudointra-predicted pixels and the pixels of the original image (step S35).Then, the pseudo intra-predicted image generation unit 1011 calculates agenerated bit amount resulting from the generation of theintra-predicted pixels or the pseudo intra-predicted pixels (step S36).

Then, the coding cost calculation unit 1012 calculates a coding cost foreach intra-prediction direction (step S37). Then, the intra-predictiondirection setting unit 1013 sets the intra-prediction direction in whichthe coding cost is the lowest as an optimal intra-prediction direction(step S38).

In the intra-prediction when the coding optimization process is sped up,decoded pixels are used for calculation of the coding cost, and thus itis necessary to sequentially perform decoding of neighboring pixels indetermining an appropriate sub-block size and an appropriate predictionmode. In contrast, in the present embodiment, the predicted pixels ofthe neighboring pixels are switched in accordance with the predictionmode for the neighboring pixels, and the switched pixels are used as thepseudo intra-predicted pixels, instead of using the neighboring decodedpixels. Thus, an appropriate prediction cost is derived withoutperforming the decoding process, and thus it is possible to realizereduction of the computational complexity while suppressing degradationof coding efficiency in the coding optimization process.

It is to be noted that in step S33 (if the prediction mode of thepredicted pixels of the neighboring pixels is the skip mode), thepredicted pixels of the skip mode are decoded pixels, and thus thepredicted image is denoted as an “intra-predicted image” rather than a“pseudo intra-predicted image”.

Third Embodiment

Next, an operation of an intra-prediction process using a pseudo decodedimage in accordance with a third embodiment of the present inventionwill be described with reference to FIG. 8. FIG. 8 is a flowchartillustrating the operation of the intra-prediction process using thepseudo decoded image in the intra-prediction processing unit 101illustrated in FIG. 2. The process illustrated in FIG. 8 uses pixelsobtained in consideration of a quantization step size of neighboringpixels when predicted pixels of the neighboring pixels and pixels of anoriginal image are used. The pseudo intra-predicted image generationunit 1011 repeats a process in steps S42 to S46 to be described belowwhile selecting one intra-prediction direction (step S41). First, thepseudo intra-predicted image generation unit 1011 determines weightingcoefficients of pseudo intra-predicted pixels from the quantization stepsize of the neighboring pixels (step S42). For example, the weightingcoefficients are determined by adjusting the weighting coefficients sothat a weight for a predicted pixel of a neighboring pixel is greaterthan a weight for a pixel of the original image when the quantizationstep size is large. Further, the weighting coefficients are determinedby adjusting the weighting coefficients so that a weight for a pixel ofthe original image is greater than a weight for a predicted pixel of aneighboring pixel when the quantization step size is small.

Then, the pseudo intra-predicted image generation unit 1011 generatesreference pixels from the predicted pixels of the neighboring pixels andthe pixels of the original image using the weighting coefficients, andgenerates the pseudo intra-predicted pixels for each intra-predictiondirection from the generated reference pixels and the intra-predictiondirection (step S43). Subsequently, the pseudo intra-predicted imagegeneration unit 1011 calculates an error between the generated pseudointra-predicted pixels and the pixels of the original image (step S44).Then, the pseudo intra-predicted image generation unit 1011 calculates agenerated bit amount resulting from the generation of the pseudointra-predicted pixels (step S45).

Then, the coding cost calculation unit 1012 calculates a coding cost foreach intra-prediction direction (step S46). Then, the intra-predictiondirection setting unit 1013 sets the intra-prediction direction in whichthe coding cost is the lowest as an optimal intra-prediction direction(step S47).

In the intra-prediction when the coding optimization process is sped up,the decoded pixels are used for calculation of the coding cost, and thusit is necessary to sequentially perform decoding of the neighboringpixels in determining an appropriate sub-block size and an appropriateprediction mode. In contrast, in the present embodiment, the pseudointra-predicted pixels are derived from the reference pixels obtained asa weighted sum of the neighboring predicted pixels and the pixels of theoriginal image based on the quantization step size of the neighboringdecoded pixels, rather than the neighboring decoded pixels, and theintra-prediction direction, and are used. Accordingly, since anappropriate coding cost is derived without performing the decodingprocess, it is possible to realize reduction of the computationalcomplexity while suppressing degradation of coding efficiency in thecoding optimization process.

Fourth Embodiment

Next, an operation of a process of calculating a correct direction ofintra-prediction in accordance with a fourth embodiment of the presentinvention will be described with reference to FIG. 9. FIG. 9 is aflowchart illustrating the operation of the process of calculating thecorrect direction of the intra-prediction in the intra-predictiondirection setting unit 1013 illustrated in FIG. 2. In the processillustrated in FIG. 9, the pseudo intra-predicted pixels and the codingcost thereof calculated in the first to third embodiments are used onlyfor a determination of the prediction mode, and if the optimalprediction mode of a sub-block is an intra-prediction mode, the correctdirection of intra-prediction is calculated using original decodedpixels as reference pixels again after a sub-block size is definitelydetermined. First, the pseudo intra-predicted image generation unit 1011generates pseudo intra-predicted pixels from reference pixels obtainedusing predicted pixels of neighboring pixels and pixels of an originalimage, and an intra-prediction direction (step S51). Subsequently, thecoding cost calculation unit 1012 calculates a coding cost for eachintra-prediction direction based on the generated pseudo intra-predictedpixels (step S52).

Then, the intra-prediction direction setting unit 1013 sets a directionin which the coding cost is the lowest as a provisional intra-predictiondirection (step S53). The intra-prediction direction setting unit 1013compares coding costs for prediction modes to determine the predictionmode (step S54). Then, the intra-prediction direction setting unit 1013determines shapes of divided blocks (step S55).

Then, the intra-prediction direction setting unit 1013 determineswhether there is a sub-block for which the intra-prediction mode isselected as the prediction mode (step S56). If there is a sub-block forwhich the intra-prediction mode is selected as the prediction mode, theintra-prediction direction setting unit 1013 calculates actual decodedpixels for only the sub-block, performs the intra-prediction again, andstores its result as the intra-prediction direction of the sub-block(step S57).

In the intra-prediction when the coding optimization process is sped up,the decoded pixels are used for calculation of the coding cost, and thusit is necessary to sequentially perform decoding of neighboring pixelsin determining an appropriate sub-block size and an appropriateprediction mode. In contrast, in the present embodiment, the pseudointra-predicted pixels are derived from the reference pixels obtainedusing the neighboring predicted pixels and the pixels of the originalimage and the intra-prediction direction, rather than the neighboringdecoded pixels, and are used to determine the sub-block size and theoptimal prediction mode. Accordingly, an appropriate coding cost isderived without performing the decoding process. Further, in the presentembodiment, after the sub-block size is determined, calculation of theintra-prediction direction is performed again on only the sub-block inwhich the intra-prediction is optimal. Accordingly, it is possible toperform more appropriate intra-prediction without increasing anunnecessary decoding process. Thus, in the present embodiment, it ispossible to realize improvement of coding efficiency while suppressingan increase in the computational complexity of coding, compared to theprocesses of the first to third embodiments.

A difference between the fourth embodiment and the first to thirdembodiments will be described with reference to FIGS. 6 and 10. FIG. 10is a flowchart illustrating an operation of a determination process ofCU division and a prediction mode in one LCU in the fourth embodiment.It is to be noted that a process in steps S61 to S66, and S69 is thesame as that in steps S21 to S27 illustrated in FIG. 6. Since anintra-prediction result for determining the optimal prediction mode, thedivision shape, and the division size is used as it is in the first tothird embodiments, there is a possibility that an appropriateintra-prediction direction is not selected when the optimal predictionmode for a sub-block is an intra-prediction mode. However, in the fourthembodiment, after the shapes of the divided blocks are determined, it isdetermined whether or not there is a sub-block for which theintra-prediction mode is selected as the prediction mode (step S67), andonly if the optimal prediction mode is the intra-prediction mode, theintra-prediction direction is obtained using the decoded pixels again,as in step S68 of FIG. 10. Therefore, in the fourth embodiment, it ispossible to perform more appropriate intra-prediction while suppressingan increase in the computational complexity of coding, compared to thefirst to third embodiments.

Next, an example of a case in which a combination of the firstembodiment and the second embodiment is applied to the process operationillustrated in FIG. 13 will be described. First, an input image isdivided into LCUs of 64×64 pixels (hereinafter, 64×64 LCUs) (process 1).Then, coding costs for prediction modes including the inter-predictionmode and the skip mode are calculated for a CU having an N×N size at theupper left corner in the upper left LCU using an encoded frame, and themode in which the coding cost is the lowest and its coding cost C1 arestored (process 2).

Then, in order to obtain a coding cost in intra-prediction of the CUhaving an N×N size, reference pixels are generated in accordance with aprediction mode for neighboring pixels thereof (process 3). Then, if theprediction mode for the neighboring pixels is a skip mode, a filter inaccordance with the direction of the intra-prediction is applied topredicted pixels of the neighboring pixels to generate intra-predictedpixels of the encoding target CU (process 3-1). In contrast, if theprediction mode for the neighboring pixels is a mode other than the skipmode, average values of the predicted pixels of the neighboring pixelsand co-located pixels of the original image are calculated to obtain thereference pixels, and a filter in accordance with the direction of theintra-prediction is applied to pixel values thereof to generate pseudointra-predicted pixels of the encoding target CU (process 3-2).

Then, process 3 is performed for each intra-prediction direction, thelowest coding cost C2 is compared with the coding cost C1, theintra-prediction direction and the coding cost are stored if the codingcost C2 is smaller, and the coding cost C1 is directly stored as thecoding cost C2 if the coding cost C1 is smaller (process 4). That is, aloop process progresses so that a minimum value is stored as the codingcost C2.

Processes 2 to 4 are repeatedly performed for the CU sizes 8×8 to 64×64,and the optimal prediction modes and their coding costs are calculatedfor the CUs having all sizes in the upper left LCU (process 5). Then, acoding cost of a CU of 16×16 pixels (hereinafter, a 16×16 CU) at theupper left corner is compared with a sum of coding costs of four CUs of8×8 pixels (hereinafter, 8×8 CUs) therein, the CU of which the codingcost is smaller is selected as the optimal CU, and CU divisioninformation, and the prediction mode and the coding cost of each CU arestored (process 6). Process 6 is then repeated for each 16×16 CU(process 7).

Then, a coding cost of a CU of 32×32 pixels (hereinafter, a 32×32 CU) atthe upper left corner is compared with a sum of coding costs of four16×16 CUs therein. In this case, the coding cost of the optimal CUselected in process 6 is used as the coding cost of the 16×16 CUs. TheCU of which the coding cost is smaller is selected as the optimal CUbased on the result of the comparison, and CU division information, andthe prediction mode and the coding cost of each CU are stored (process8). Process 8 is repeated for each 32×32 CU (process 9).

Then, a coding cost of a CU of 64×64 pixels (hereinafter, a 64×64 CU) iscompared with a sum of coding costs of four 32×32 CUs therein. In thiscase, the coding cost of the optimal CU selected in process 8 is used asthe coding cost of the 32×32 CUs. The CU of which the coding cost issmaller is selected as the optimal CU based on the result of thecomparison, and CU division information, and the prediction mode and thecoding cost of each CU are stored (process 10). Then, processes 2 to 10are repeated for each LCU (process 11).

Next, an example of a case in which a combination of the secondembodiment and the third embodiment is applied to the process operationillustrated in FIG. 13 will be described. First, an input image isdivided into 64×64 LCUs (process 21). Then, coding costs for predictionmodes including the inter-prediction mode and the skip mode arecalculated for a CU having an N×N size at the upper left corner in theupper left LCU using an encoded frame, and the mode in which the codingcost is the lowest and its coding cost C1 are stored (process 22).

Then, in order to obtain a coding cost in intra-prediction of the CUhaving an N×N size, reference pixels are generated in accordance with aprediction mode for neighboring pixels (process 23). If the predictionmode for the neighboring pixels is a skip mode, a filter in accordancewith the direction of the intra-prediction is applied to predictedpixels of the neighboring pixels to generate intra-predicted pixels ofthe encoding target CU (process 23-1). In contrast, if the predictionmode for the neighboring pixels is a mode other than the skip mode, aweighted sum based on a quantization step size of the neighboring pixelsis calculated for the predicted pixels of the neighboring pixels andco-located pixels of the original image to obtain the reference pixels,and a filter in accordance with the direction of the intra-prediction isapplied to their pixel values to generate pseudo intra-predicted pixelsof the encoding target CU (process 23-2). A method for calculating theweighted sum is as follows.

If the prediction mode for the neighboring pixels is theintra-prediction mode,P(x,y)=(1−(α−1)/(N−1)×½)O(x,y)+((α−1)/(N−1)×½)×R(x,y)If the prediction mode for the neighboring pixels is theinter-prediction mode,P(x,y)=(1−(α−1)/(N−1)×⅔)O(x,y)+((a−1)/(N−1)×⅔)×R(x,y)

Here,

O(x, y): The pixel of the original image

R(x, y): The reference pixel

P(x, y): The pseudo intra-predicted pixel

α: The quantization step size (=1, . . . , N)

N: A maximum value of the quantization step size.

Process 23 is performed for each intra-prediction direction, the lowestcoding cost C2 is compared with the coding cost C1, the intra-predictiondirection and the coding cost are stored if the coding cost C2 issmaller, and the coding cost C1 is directly stored as the coding cost C2if the coding cost C1 is smaller (process 24). Processes 22 to 24 arerepeatedly performed for CU sizes 8×8 to 64×64, and the optimalprediction mode and its coding cost are calculated for the CUs havingall sizes in the upper left LCU (process 25).

Then, a coding cost of a 16×16 CU at the upper left corner is comparedwith a sum of coding costs of four 8×8 CUs therein, the CU of which thecoding cost is smaller is selected as the optimal CU, and CU divisioninformation, and the prediction mode and the coding cost of each CU arestored (process 26). Then, process 26 is repeated for each 16×16 CU(process 27). Then, a coding cost of a 32×32 CU at the upper left corneris compared with a sum of coding costs of four 16×16 CUs therein. Inthis case, the coding cost of the optimal CU selected in process 26 isused as the coding cost of the 16×16 CUs. The CU of which the codingcost is smaller is selected as the optimal CU based on the result of thecomparison, and CU division information, and the prediction mode and thecoding cost of each CU are stored (process 28). Then, process 28 isrepeated for each 32×32 CU (process 29).

Then, a coding cost of a 64×64 CU is compared with a sum of coding costsof four 32×32 CUs therein. In this case, the coding cost of the optimalCU selected in process 28 is used as the coding cost of the 32×32 CUs.The CU of which the coding cost is smaller is selected as the optimal CUbased on the result of the comparison, and CU division information, andthe prediction mode and the coding cost of each CU are stored (process30). Then, processes 22 to 30 are repeated for each LCU (process 31).

Next, an example of a case in which a combination of the secondembodiment, the third embodiment, and the fourth embodiment is appliedto the process operation illustrated in FIG. 13 will be described.First, an input image is divided into 64×64 LCUs (process 41). Then,coding costs for prediction modes including the inter-prediction modeand the skip mode are calculated for a CU having an N×N size at theupper left corner in the upper left LCU using an encoded frame, and themode in which the coding cost is the lowest and its coding cost C1 arestored (process 42).

Then, in order to obtain a coding cost in intra-prediction of the CUhaving an N×N size, reference pixels are generated in accordance with aprediction mode for neighboring pixels (process 43). If the predictionmode for the neighboring pixels is a skip mode, a filter in accordancewith the direction of the intra-prediction is applied to the predictedpixels of the neighboring pixels to generate intra-predicted pixels ofthe encoding target CU (process 43-1). In contrast, if the predictionmode for the neighboring pixels is a mode other than the skip mode, aweighted sum based on a quantization step size of the neighboring pixelsis calculated for predicted pixels of the neighboring pixels andco-located pixels of the original image to obtain the reference pixels,and a filter in accordance with the direction of the intra-prediction isapplied to their pixel values to generate pseudo intra-predicted pixelsof the encoding target CU (process 43-2). A method for calculating theweighted sum is as follows.

If the prediction mode for the neighboring pixels is theintra-prediction mode,P(x,y)=(1−(α−1)/(N−1)×½)O(x,y)+((α−1)/(N−1)×½)×R(x,y)If the prediction mode for the neighboring pixels is theinter-prediction mode,P(x,y)=(1−(α−1)/(N−1)×⅔)O(x,y)+((α−1)/(N−1)×⅔)×R(x,y)

Here,

O(x, y): The pixel of the original image

R(x, y): The reference pixel

P(x, y): The pseudo intra-predicted pixel

α: The quantization step size (=1, . . . , N)

N: A maximum value of the quantization step size.

Then, process 43 is performed for each intra-prediction direction, thelowest coding cost C2 is compared with the coding cost C1, theintra-prediction direction and the coding cost are stored if the codingcost C2 is smaller, and the coding cost C1 is directly stored as thecoding cost C2 if the coding cost C1 is smaller (process 44). Processes42 to 44 are repeatedly performed for CU sizes 8×8 to 64×64, and theoptimal prediction modes and their coding costs are calculated for theCUs having all sizes in the upper left LCU (process 45).

Then, a coding cost of a 16×16 CU at the upper left corner is comparedwith a sum of coding costs of four 8×8 CUs therein, the CU of which thecoding cost is smaller is selected as the optimal CU, and CU divisioninformation, and the prediction mode and the coding cost of each CU arestored (process 46). Then, process 46 is repeated for each 16×16 CU(process 47).

Then, a coding cost of a 32×32 CU at the upper left corner is comparedwith a sum of coding costs of four 16×16 CUs therein. In this case, thecoding cost of the optimal CU selected in process 46 is used as thecoding cost of the 16×16 CUs. The CU of which the coding cost is smalleris selected as the optimal CU based on the result of the comparison, andCU division information, and the prediction mode and the coding cost ofeach CU are stored (process 48). Then, process 48 is repeated for each32×32 CU (process 49).

Then, a coding cost of a 64×64 CU is compared with a sum of coding costsof four 32×32 CUs therein. In this case, the coding cost of the optimalCU selected in process 48 is used as the coding cost of the 32×32 CUs.The CU of which the coding cost is smaller is selected as the optimal CUbased on the result of the comparison, and CU division information, andthe prediction mode and the coding cost of each CU are stored (process50).

Then, if a CU in which the intra-prediction mode is the optimalprediction mode is included in the finally stored CUs in the LCU,decoding of neighboring pixels is sequentially performed using a fixeddivision size and mode of the CU, and the optimal intra-predictiondirection is obtained again and stored only for a location of theintra-prediction (process 51). Then, processes 42 to 51 are repeated foreach LCU.

As described above, it is possible to reduce the computationalcomplexity required for intra-prediction by calculating the coding costfor the pseudo intra-predicted image generated from the reference pixelsobtained using the predicted pixels of the neighboring pixels and thepixels of the original image, rather than the neighboring decodedpixels, and the intra-prediction direction, and determining the optimalprediction direction based on the coding cost.

The intra-prediction processing unit 101 in the embodiments describedabove may be realized by a computer. In this case, the intra-predictionprocessing unit 101 may be realized by recording a program for realizingthe functions thereof on a computer-readable recording medium, loadingthe program recorded in the recording medium to the computer, andexecuting the program. It is to be noted that “the computer system”stated herein includes an operating system (OS) and hardware such asperipheral devices. Further, the “computer-readable recording medium”includes a portable medium such as a flexible disk, a magneto-opticaldisc, a read only memory (ROM), and a compact disc (CD)-ROM, and astorage apparatus such as a hard disk built in a computer system.Further, the “computer-readable recording medium” may also include arecording medium that dynamically holds a program for a short period oftime, such as a communication line when the program is transmitted overa network such as the Internet or a communication line such as atelephone line and a recording medium that holds a program for a certainperiod of time, such as a volatile memory inside a computer system whichfunctions as a server or a client in such a case. Further, the programmay be a program for realizing part of the above-described functions ormay be a program capable of realizing the above-described functions incombination with a program previously stored in the computer system.Further, the intra-prediction processing unit 101 may be realized usinghardware such as a programmable logic device (PLD) or a fieldprogrammable gate array (FPGA).

While embodiments of the present invention have been described abovewith reference to the drawings, it is obvious that the embodiments areonly examples of the present invention and the present invention is notlimited to the embodiments. Accordingly, additions, omissions,substitutions, and other modifications of the structural components maybe performed without departing from the technical concept and scope ofthe present invention.

INDUSTRIAL APPLICABILITY

The present invention is applicable to applications which reduce thecomputational complexity necessary for intra-prediction by calculatingthe coding cost for the pseudo intra-predicted image generated from thereference pixels obtained using the predicted pixels of the neighboringpixels and the pixels of the original image, rather than the neighboringdecoded pixels, and the intra-prediction direction, and determining theoptimal prediction direction based on the coding cost.

DESCRIPTION OF REFERENCE SIGNS

-   101 Intra-prediction processing unit-   1011 Pseudo intra-predicted image generation unit-   1012 Coding cost calculation unit-   1013 Intra-prediction direction setting unit

The invention claimed is:
 1. An image encoding apparatus comprising: askip mode determination unit that determines whether a prediction modeof predicted pixels of neighboring pixels for an intra-predictiondirection is a skip mode; an intra-predicted pixel/pseudointra-predicted pixel generation unit that sets the predicted pixels ofthe neighboring pixels as reference pixels and generates intra-predictedpixels from the reference pixels if a determination result of the skipmode determination unit is the skip mode, and generates the referencepixels from the predicted pixels of the neighboring pixels and pixels ofan original image and generates pseudo intra-predicted pixels from thegenerated reference pixels and intra-prediction directions if thedetermination result is a mode other than the skip mode; a coding costcalculation unit that calculates coding costs for intra-predictiondirections from errors between the intra-predicted pixels or the pseudointra-predicted pixels and the pixels of the original image andgenerated bit amounts when the intra-predicted pixels or the pseudointra-predicted pixels are generated; and an intra-prediction directionsetting unit that sets an intra-prediction direction corresponding tothe lowest coding cost among the coding costs as an optimalintra-prediction direction.
 2. The image encoding apparatus according toclaim 1, wherein a coding cost for an intra-prediction direction set inunits of blocks is compared with a coding cost for a mode other than anintra-prediction mode, and intra-prediction is performed again using aneighboring decoded image on a block in which the coding cost for theoptimal intra-prediction direction is smaller.
 3. An image encodingapparatus comprising: a weighting coefficient generation unit thatgenerates weighting coefficients that are used when a pseudointra-predicted image is generated from a quantization step size ofpredicted pixels of neighboring pixels for an intra-predictiondirection; a pseudo intra-predicted pixel generation unit that generatesreference pixels using the weighting coefficients from the predictedpixels of the neighboring pixels and pixels of an original image, andgenerates pseudo intra-predicted pixels from the reference pixels andintra-prediction directions; a coding cost calculation unit thatcalculates coding costs for the intra-prediction directions from errorsbetween the pseudo intra-predicted pixels and the pixels of the originalimage and generated bit amounts when the pseudo intra-predicted pixelsare generated; and an intra-prediction direction setting unit that setsan intra-prediction direction corresponding to the lowest coding costamong the coding costs as an optimal intra-prediction direction.
 4. Theimage encoding apparatus according to claim 3, wherein a coding cost foran intra-prediction direction set in units of blocks is compared with acoding cost for a mode other than an intra-prediction mode, andintra-prediction is performed again using a neighboring decoded image ona block in which the coding cost for the optimal intra-predictiondirection is smaller.